package cn.yunhe.service.impl;

import cn.yunhe.dao.MemberDao;
import cn.yunhe.model.Member;
import cn.yunhe.service.MemberBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service(value = "memberBiz")
public class MemberBizImpl implements MemberBiz {

    @Autowired
    @Qualifier(value = "memberDao")
    private MemberDao memberDao;

    @Override
    public List<Member> searchByConditions(Map<String, Object> objectMap) {
        return memberDao.searchByConditions(objectMap);
    }

    @Override
    public Integer searchByConditions2TotalRecords(Map<String, Object> objectMap) {
        return memberDao.searchByConditions2TotalRecords(objectMap);
    }

    @Override
    public boolean insertMember(Member member) {
        return memberDao.insertMember(member);
    }

    @Override
    public boolean updateMember(Member member) {
        return memberDao.updateMember(member);
    }

    @Override
    public boolean deleteMember(int mid) {
        return memberDao.deleteMember(mid);
    }

    public MemberDao getMemberDao() {
        return memberDao;
    }

    public void setMemberDao(MemberDao memberDao) {
        this.memberDao = memberDao;
    }
}
